<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    
    <ui:composition template="/directorID/templateDirectorID.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditEvaluadorTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                     <h:outputLabel value="#{bundle.EditPersonaLabel_cedula}" for="cedula" />
                    <h:inputText id="cedula" value="#{personaController.selected.cedula}" title="#{bundle.EditPersonaTitle_cedula}" required="true" requiredMessage="#{bundle.EditPersonaRequiredMessage_cedula}"/>
                    <h:outputLabel value="#{bundle.EditPersonaLabel_login}" for="login" />
                    <h:inputText id="login" value="#{personaController.selected.login}" title="#{bundle.EditPersonaTitle_login}" required="true" requiredMessage="#{bundle.EditPersonaRequiredMessage_login}"/>
                    <h:outputLabel value="#{bundle.EditPersonaLabel_contrasennia}" for="contrasennia" />
                    <h:inputText id="contrasennia" value="#{personaController.selected.contrasennia}" title="#{bundle.EditPersonaTitle_contrasennia}" required="true" requiredMessage="#{bundle.EditPersonaRequiredMessage_contrasennia}"/>
                    <h:outputLabel value="#{bundle.EditPersonaLabel_nombres}" for="nombres" />
                    <h:inputText id="nombres" value="#{personaController.selected.nombres}" title="#{bundle.EditPersonaTitle_nombres}" required="true" requiredMessage="#{bundle.EditPersonaRequiredMessage_nombres}"/>
                    <h:outputLabel value="#{bundle.EditPersonaLabel_apellidos}" for="apellidos" />
                    <h:inputText id="apellidos" value="#{personaController.selected.apellidos}" title="#{bundle.EditPersonaTitle_apellidos}" required="true" requiredMessage="#{bundle.EditPersonaRequiredMessage_apellidos}"/>
                    <h:outputLabel value="#{bundle.EditPersonaLabel_direccion}" for="direccion" />
                    <h:inputText id="direccion" value="#{personaController.selected.direccion}" title="#{bundle.EditPersonaTitle_direccion}" />
                    <h:outputLabel value="#{bundle.EditPersonaLabel_telefono}" for="telefono" />
                    <h:inputText id="telefono" value="#{personaController.selected.telefono}" title="#{bundle.EditPersonaTitle_telefono}" />
                    <h:outputLabel value="#{bundle.EditPersonaLabel_sexo}" for="sexo" />
                    <h:selectOneListbox title="#{bundle.EditPersonaLabel_sexo}" value="#{personaController.selected.sexo}" size="1" required="true" requiredMessage="#{bundle.CreatePersonaRequiredMessage_sexo}"> 
                        <f:selectItem itemLabel="----"/>
                        <f:selectItem itemValue="M" itemLabel="Masculino"/>
                        <f:selectItem itemValue="F" itemLabel="Feminino"/>
                    </h:selectOneListbox>
                    <h:outputLabel value="#{bundle.EditPersonaLabel_movil}" for="movil" />
                    <h:inputText id="movil" value="#{personaController.selected.movil}" title="#{bundle.EditPersonaTitle_movil}" />
                    <h:outputLabel value="#{bundle.EditPersonaLabel_correo}" for="correo" />
                    <h:inputText id="correo" value="#{personaController.selected.correo}" title="#{bundle.EditPersonaTitle_correo}" required="true" requiredMessage="#{bundle.EditPersonaRequiredMessage_correo}"/>
                   
                    <h:outputLabel value="#{bundle.EditPersonaLabel_codigoPerfil}" for="codigoPerfil" />
                    <h:outputText id="codigoPerfil" styleClass="codigoPerfil" value="#{personaController.selected.codigoPerfil.nombre}" title="#{bundle.EditPersonaTitle_codigoPerfil}" />
                </h:panelGrid>
                
                <!--                Evaluador-->
                <h:panelGrid columns="2" styleClass="pEvaluador">
                    <h:outputLabel value="#{bundle.CreateEvaluadorLabel_tituloEstudios}" for="tituloEstudios" />
                    <h:inputText id="tituloEstudios" value="#{personaController.tituloEstudios}" title="#{bundle.CreateEvaluadorTitle_tituloEstudios}" required="false" requiredMessage="#{bundle.CreateEvaluadorRequiredMessage_tituloEstudios}"/>
                    <h:outputLabel value="#{bundle.CreateEvaluadorLabel_otrosEstudios}" for="otrosEstudios" />
                    <h:inputText id="otrosEstudios" value="#{personaController.otrosEstudios}" title="#{bundle.CreateEvaluadorTitle_otrosEstudios}" required="false" requiredMessage="#{bundle.CreateEvaluadorRequiredMessage_otrosEstudios}"/>
                    <h:outputLabel value="#{bundle.CreateEvaluadorLabel_experienciaAnnios}" for="experienciaAnnios" />
                    <h:inputText id="experienciaAnnios" value="#{personaController.experienciaAnnios}" title="#{bundle.CreateEvaluadorTitle_experienciaAnnios}" required="false" requiredMessage="#{bundle.CreateEvaluadorRequiredMessage_experienciaAnnios}"/>
                   
                    <h:outputLabel value="#{bundle.CreateEvaluadorLabel_codigoNivelEstudios}" for="codigoNivelEstudios" />
                    <h:selectOneMenu id="codigoNivelEstudios" value="#{personaController.paraEditarNivelEstudios}" title="#{bundle.CreateEvaluadorTitle_codigoNivelEstudios}" required="false" requiredMessage="#{bundle.CreateEvaluadorRequiredMessage_codigoNivelEstudios}">
                        <f:selectItems value="#{nivelEstudiosController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
<!--                termino evaluador-->

                <h:commandLink action="#{personaController.updateEvaluador}" value="#{bundle.EditPersonaSaveLink}"/>
                <br />
                <br />                
                <h:commandLink value="#{bundle.EditPersonaIndexLink}" action="#{personaController.prepareList}" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
